using Mbl.ParameterizedTest.FluentCollectionBuilding.Expectors.EnumerableExpectations;
using System.Collections.Generic;

namespace Mbl.ParameterizedTest.FluentCollectionBuilding.Expectors
{
    public class EnumerableExpector<TIn1, TElement, TCollector> : Expector<TIn1, IEnumerable<TElement>, TCollector>
        where TCollector : ITestCollector<TIn1, IEnumerable<TElement>>		
    {
        public EnumerableExpector(TCollector testRowCollector, TestCase<TIn1, IEnumerable<TElement>> testCase)
            : base(testRowCollector, testCase)
        {
            
        }

        public Justifier<TIn1, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart)
        {
            return CreateJustifier(new ContainsExpectation<TElement>(expectedpart));
        }

		public Justifier<TIn1, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart, params TElement[] expectedAsWell)
        {
			var expectedParts = new List<TElement> {expectedpart};
			expectedParts.AddRange(expectedAsWell);
            return CreateJustifier(new ContainsAllExpectation<TElement>(expectedParts));
        }

		public Justifier<TIn1, IEnumerable<TElement>, TCollector> ExpectContainsAny(params TElement[] expectedParts)
        {
            return CreateJustifier(new ContainsAnyExpectation<TElement>(expectedParts));
        }
    }    

    public class EnumerableExpector<TIn1, TIn2, TElement, TCollector> : Expector<TIn1, TIn2, IEnumerable<TElement>, TCollector>
        where TCollector : ITestCollector<TIn1, TIn2, IEnumerable<TElement>>		
    {
        public EnumerableExpector(TCollector testRowCollector, TestCase<TIn1, TIn2, IEnumerable<TElement>> testCase)
            : base(testRowCollector, testCase)
        {
            
        }

        public Justifier<TIn1, TIn2, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart)
        {
            return CreateJustifier(new ContainsExpectation<TElement>(expectedpart));
        }

		public Justifier<TIn1, TIn2, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart, params TElement[] expectedAsWell)
        {
			var expectedParts = new List<TElement> {expectedpart};
			expectedParts.AddRange(expectedAsWell);
            return CreateJustifier(new ContainsAllExpectation<TElement>(expectedParts));
        }

		public Justifier<TIn1, TIn2, IEnumerable<TElement>, TCollector> ExpectContainsAny(params TElement[] expectedParts)
        {
            return CreateJustifier(new ContainsAnyExpectation<TElement>(expectedParts));
        }
    }    

    public class EnumerableExpector<TIn1, TIn2, TIn3, TElement, TCollector> : Expector<TIn1, TIn2, TIn3, IEnumerable<TElement>, TCollector>
        where TCollector : ITestCollector<TIn1, TIn2, TIn3, IEnumerable<TElement>>		
    {
        public EnumerableExpector(TCollector testRowCollector, TestCase<TIn1, TIn2, TIn3, IEnumerable<TElement>> testCase)
            : base(testRowCollector, testCase)
        {
            
        }

        public Justifier<TIn1, TIn2, TIn3, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart)
        {
            return CreateJustifier(new ContainsExpectation<TElement>(expectedpart));
        }

		public Justifier<TIn1, TIn2, TIn3, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart, params TElement[] expectedAsWell)
        {
			var expectedParts = new List<TElement> {expectedpart};
			expectedParts.AddRange(expectedAsWell);
            return CreateJustifier(new ContainsAllExpectation<TElement>(expectedParts));
        }

		public Justifier<TIn1, TIn2, TIn3, IEnumerable<TElement>, TCollector> ExpectContainsAny(params TElement[] expectedParts)
        {
            return CreateJustifier(new ContainsAnyExpectation<TElement>(expectedParts));
        }
    }    

    public class EnumerableExpector<TIn1, TIn2, TIn3, TIn4, TElement, TCollector> : Expector<TIn1, TIn2, TIn3, TIn4, IEnumerable<TElement>, TCollector>
        where TCollector : ITestCollector<TIn1, TIn2, TIn3, TIn4, IEnumerable<TElement>>		
    {
        public EnumerableExpector(TCollector testRowCollector, TestCase<TIn1, TIn2, TIn3, TIn4, IEnumerable<TElement>> testCase)
            : base(testRowCollector, testCase)
        {
            
        }

        public Justifier<TIn1, TIn2, TIn3, TIn4, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart)
        {
            return CreateJustifier(new ContainsExpectation<TElement>(expectedpart));
        }

		public Justifier<TIn1, TIn2, TIn3, TIn4, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart, params TElement[] expectedAsWell)
        {
			var expectedParts = new List<TElement> {expectedpart};
			expectedParts.AddRange(expectedAsWell);
            return CreateJustifier(new ContainsAllExpectation<TElement>(expectedParts));
        }

		public Justifier<TIn1, TIn2, TIn3, TIn4, IEnumerable<TElement>, TCollector> ExpectContainsAny(params TElement[] expectedParts)
        {
            return CreateJustifier(new ContainsAnyExpectation<TElement>(expectedParts));
        }
    }    

    public class EnumerableExpector<TIn1, TIn2, TIn3, TIn4, TIn5, TElement, TCollector> : Expector<TIn1, TIn2, TIn3, TIn4, TIn5, IEnumerable<TElement>, TCollector>
        where TCollector : ITestCollector<TIn1, TIn2, TIn3, TIn4, TIn5, IEnumerable<TElement>>		
    {
        public EnumerableExpector(TCollector testRowCollector, TestCase<TIn1, TIn2, TIn3, TIn4, TIn5, IEnumerable<TElement>> testCase)
            : base(testRowCollector, testCase)
        {
            
        }

        public Justifier<TIn1, TIn2, TIn3, TIn4, TIn5, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart)
        {
            return CreateJustifier(new ContainsExpectation<TElement>(expectedpart));
        }

		public Justifier<TIn1, TIn2, TIn3, TIn4, TIn5, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart, params TElement[] expectedAsWell)
        {
			var expectedParts = new List<TElement> {expectedpart};
			expectedParts.AddRange(expectedAsWell);
            return CreateJustifier(new ContainsAllExpectation<TElement>(expectedParts));
        }

		public Justifier<TIn1, TIn2, TIn3, TIn4, TIn5, IEnumerable<TElement>, TCollector> ExpectContainsAny(params TElement[] expectedParts)
        {
            return CreateJustifier(new ContainsAnyExpectation<TElement>(expectedParts));
        }
    }    

    public class EnumerableExpector<TIn1, TIn2, TIn3, TIn4, TIn5, TIn6, TElement, TCollector> : Expector<TIn1, TIn2, TIn3, TIn4, TIn5, TIn6, IEnumerable<TElement>, TCollector>
        where TCollector : ITestCollector<TIn1, TIn2, TIn3, TIn4, TIn5, TIn6, IEnumerable<TElement>>		
    {
        public EnumerableExpector(TCollector testRowCollector, TestCase<TIn1, TIn2, TIn3, TIn4, TIn5, TIn6, IEnumerable<TElement>> testCase)
            : base(testRowCollector, testCase)
        {
            
        }

        public Justifier<TIn1, TIn2, TIn3, TIn4, TIn5, TIn6, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart)
        {
            return CreateJustifier(new ContainsExpectation<TElement>(expectedpart));
        }

		public Justifier<TIn1, TIn2, TIn3, TIn4, TIn5, TIn6, IEnumerable<TElement>, TCollector> ExpectContains(TElement expectedpart, params TElement[] expectedAsWell)
        {
			var expectedParts = new List<TElement> {expectedpart};
			expectedParts.AddRange(expectedAsWell);
            return CreateJustifier(new ContainsAllExpectation<TElement>(expectedParts));
        }

		public Justifier<TIn1, TIn2, TIn3, TIn4, TIn5, TIn6, IEnumerable<TElement>, TCollector> ExpectContainsAny(params TElement[] expectedParts)
        {
            return CreateJustifier(new ContainsAnyExpectation<TElement>(expectedParts));
        }
    }    

}